import request from '@/utils/request'

// 查询商品评价列表
export function listSpuComment(query) {
  return request({
    url: '/product/spuComment/list',
    method: 'get',
    params: query
  })
}

// 查询商品评价详细
export function getSpuComment(id) {
  return request({
    url: '/product/spuComment/' + id,
    method: 'get'
  })
}

// 删除商品评价
export function delSpuComment(id) {
  return request({
    url: '/product/spuComment/' + id,
    method: 'delete'
  })
}

// 添加回复
export function addReply(data) {
  return request({
    url: '/order/item/commentReply',
    method: 'post',
    data: data
  })
}

// 修改回复
export function updateReply(data) {
  return request({
    url: '/product/spuCommentReply',
    method: 'put',
    data: data
  })
}
// 删除回复
export function delReply(id) {
  return request({
    url: '/product/spuCommentReply/' + id,
    method: 'delete'
  })
}
